Cookie based Authentication
With automation, most of the cases start with logging into the the application under test. But does this have to be repeated for every use case?
DevAssure provides the support to authenticate users based on cookie storage. While recording, the state can be stored in a file, and the same file can be loaded every time when there is a use case to be automated with an auth flow.
This enhances execution time of the test automation and also reduces test automation flakiness.
Recording and saving the cookie information
After saving the recording
Loading the state from the file while recording
Sample DevAssure Test Automation Code
In the above code, additional checks have been added to login with username and password if the tokens stored have expired. In subsequent executions, the new cookie state saved will be considered.